<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib tagdir="/WEB-INF/tags" prefix="p" %>
<%String ctx = request.getContextPath(); %>

<jsp:include page="../common/operate.jsp">
	<jsp:param name="title1" value="任务日程"/>
	<jsp:param name="title2" value=""/>
	<jsp:param name="isShowAddBtn" value="true"/>
	<jsp:param name="isShowUpdateBtn" value="true"/>
	<jsp:param name="isShowDeleteBtn" value="true"/>
</jsp:include>


<div style="width:98%" class="f_l margin1">
	<s:form id="listForm" method="POST" theme="simple">
    <table width="98%" cellspacing="0" cellpadding="0" border="0" class="clear f_l padding3" id="tb">
      <tr class="bg4_nav">
       <td width="6%" style="border:0">
			<input onclick="javascript:batchSelect(this)" type="checkbox" style="border:0" name="List_Selected2">
		</td>
        <td class="t_c" style="border:0">
                           序号
        </td>
        <td class="t_c" style="border:0">
                          任务名称
        </td>
        <td class="t_c" style="border:0">
                          发起人
        </td>
        <td class="t_c" style="border:0">
                          负责人
        </td>
        <td class="t_c" style="border:0">
                          内容
        </td>
        <td class="t_c" style="border:0">
                          开始时间
        </td>
        <td class="t_c" style="border:0">
                         结束时间
        </td>
        <td class="t_c" style="border:0">
                          状态
        </td>
      </tr>
    <s:iterator value="pager.result" status="status">
      <tr onmouseover="this.bgColor='#F2E6E6'" onmouseout="this.bgColor=''">
      <td class="border_tb">
       		<input type="checkbox" style="border:0" name="ids" value="${id }">
       </td>
        <td class="border_tb">
          <s:property value="id"/>
        </td>
        <td class="border_tb">
          <s:property value="taskName"/>
        </td>
        <td class="border_tb">
          <s:property value="creatorName"/>
        </td>
        <td class="border_tb">
          <s:property value="ownerName"/>
        </td>
        <td class="border_tb">
          <s:property value="content"/>
        </td>
        <td class="border_tb">
          <s:date name="startDate" format="yyyy年MM月dd日"/>
        </td>
        <td class="border_tb">
          <s:date name="endDate" format="yyyy年MM月dd日"/>
        </td>
        <td class="border_tb">
          <s:property value="state"/>
          <s:if test="status==0">未开始</s:if>
          <s:elseif test="status==1">处理中</s:elseif>
          <s:elseif test="status==2">结束</s:elseif>
          <s:elseif test="status==3">延期</s:elseif>
        </td>
      </tr>
    </s:iterator>
    </table>
    </s:form>
    <div class="f_l margin1"><img src="<%=ctx%>/img/business/main_07.jpg"></div>
  </div>
  <div style="width: 90%;margin-top: 20px;">
    <p:page pager="${pager}" url="task!list.action" namespace="/task"/>
  </div> 
  <script type="text/javascript">
$(window).ready(function(){
	addOperate('addButton','<%=ctx%>/task/task!add');
	updateOperate('updateButton','<%=ctx%>/task/task!toEdit');
	batchDelete('deleteButton','listForm','<%=ctx%>/task/task!deleteAll');
	isAllSelected('listForm');	
});
</script>